package mapping

import (
	"maya-service/model"
	"maya-service/model/entity"
)

// QuanxiRecordsEntityToDto entity data transfer
func QuanxiRecordsEntityToDto(quanxiRecords []*entity.QuanxiRecord) []*model.QuanxiRecordInfo {
	out := make([]*model.QuanxiRecordInfo, 0, len(quanxiRecords))
	for _, c := range quanxiRecords {
		out = append(out, QuanxiRecordEntityToDto(c))
	}
	return out
}

// QuanxiRecordEntityToDto entity data transfer
func QuanxiRecordEntityToDto(e *entity.QuanxiRecord) *model.QuanxiRecordInfo {
	return &model.QuanxiRecordInfo{

		Id: e.Id,

		UserId: e.UserId,

		Status: e.Status,

		AnswerName: e.AnswerName,

		AnswerType: e.AnswerType,

		Select: e.Select,

		QuestionId: e.QuestionId,

		CreatedAt: e.CreatedAt,

		UpdatedAt: e.UpdatedAt,
	}
}
